<!doctype html>
<%@ page language="java"  pageEncoding="UTF-8"%>
<html>
<head>
	<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
	<%
	 String path = request.getContextPath();
	%>
	<%@ include file="/WEB-INF/views-jsp/include/taglib/taglib.jsp" %>
	<%@ include file="/WEB-INF/views-jsp/include/meta/meta.jsp" %>
	<%@ include file="/WEB-INF/views-jsp/include/script/script.jsp" %>
	<%@ include file="/WEB-INF/views-jsp/include/ztree/ztree.jsp" %>
	<%@ include file="/WEB-INF/views-jsp/include/link/link.jsp" %>
	<script type="text/javascript" src="${path}/html/js/js-jsp/ba/menu/menuOption.js?v=<%out.print(Math.random());%>"></script>
	<script type="text/javascript" src="${path}/html/js/js-jsp/common/select-plugin.js"></script>
</head>
	<body>
		<div class="place">
			<span>当前位置：</span>
			<ul class="placeul">
				<li><a href="${path}/menu/index.do">菜单管理</a></li>
				<li>
					<c:if test="${null == menu.meId}">
						<a>添加菜单</a>
					</c:if>
					<c:if test="${null != menu.meId}">
						<a>编辑菜单</a>
					</c:if>
				</li>
			</ul>
		</div>
		<form id="operate_form" class="form" method="post" action="#">
			<div class="formbody">
				<div class="formtitle">
					<span>基本信息</span>
				</div>
				<ul class="forminfo">
					<li>
						<input type="hidden" name="meId" id="meId" value="${menu.meId}" />
						<label>上级菜单：</label>
						<input type="hidden" name="parentId" id="parentId" value="${menu.parent.meId}" style="width:255px; height: 32px" />
						<input class="easyui-combotree" editable="false" data-options="prompt:'请输入根节点菜单',validType:'menuIsExists[\'menuTree\']'" id="menuTree" style="width:255px; height: 32px">
						</input>
					</li>
					<li>
						<label>菜单名称：</label>
						<input class="easyui-textbox" type="text" name="name" id="name" value="${menu.name}" data-options="required:true,prompt:'请输入菜单名称',validType:'length[1,16]'" missingMessage="菜单名称不能为空"   style="width:255px; height: 32px">
					</li>
					<li>
						<label>菜单类型：</label>
						<select class="easyui-combobox" name="meType" id="meType" value="${menu.meType}" style="width:255px; height: 32px" editable="false">
							<option value="1" ${menu.meType == 1 ? 'selected="selected"' : ""}>页面</option>
							<option value="2" ${menu.meType == 2 ? 'selected="selected"' : ""}>按钮</option>
						</select>
					</li>
					<li>
						<label>菜单链接：</label>
						<input class="easyui-textbox" type="text" data-options="prompt:'请输入菜单链接',validType:'length[1,200]'" name="href" id="href" value="${menu.href}"  style="width:255px; height: 32px">
					</li>
					<li>
                        <label>打开目标：</label>
                        <input class="easyui-textbox" type="text" data-options="prompt:'请输入需要打开的目标',validType:'length[1,20]'" name="target" id="target" value="${menu.target}" style="width:255px; height: 32px">
					</li>
					<li>
                        <label>菜单排序：</label>
                        <input class="easyui-textbox" type="text" data-options="prompt:'请输入菜单排序',validType:['length[1,10]','integer']" name="sort" id="sort" value="${menu.sort}" style="width:255px; height: 32px">
					</li>
					<li>
                        <label>菜单图标：</label>
						<div style="border: none;  width: 28px; height: 28px; float: left">
							<a id="icon-to-show" class="easyui-linkbutton" style="background: darkseagreen" data-options="iconCls:'${menu.iconCls}'"></a>
							<input type="hidden" name="iconCls" id="iconCls" value="${menu.iconCls}">
						</div>
						<div style="float: left; width: 128px; height: 28px; margin-left: 15px; margin-bottom: 10px ">
							<a href="javascript:void(0);" id="chooseIcon" class="easyui-linkbutton">选择图标</a>
						</div>
					</li>
					<%--<li>--%>
                        <%--<label>菜单图片：</label>--%>
                        <%--<input class="easyui-textbox" type="text" name="meBgImg" id="meBgImg" value="${menu.meBgImg}" style="width:255px; height: 32px">--%>
					<%--</li>--%>
					<li>
                        <label>是否显示：</label>
                        <select class="easyui-combobox" name="isShow" id="isShow" value="${menu.isShow}" style="width:255px; height: 32px" editable="false">
                            <option value="1" ${menu.isShow == 1 ? 'selected="selected"' : ""}>显示</option>
                            <option value="2" ${menu.isShow == 2 ? 'selected="selected"' : ""}>不显示</option>
                        </select>
					</li>
					<li>
                        <label>权限标识：</label>
						<input type="hidden" id="oldPermission" value="${menu.permission}">
                        <input class="easyui-textbox" name="permission" data-options="prompt:'请输入权限标识',validType:['length[1,100]','permissionIsExists[oldPermission]'],delay:30000000,interval:30000000,validateOnBlur:true" id="permission" value="${menu.permission}" style="width:255px; height: 32px">
					</li>
					<li>
						<label style="vertical-align: top">备注信息：</label>
						<input class="easyui-textbox" name="remark" id="remark" data-options="multiline:true,prompt:'请输入备注信息',validType:'length[1,200]'" value="${menu.remark}" style="width:255px;height:100px">
					</li>
				</ul>
			</div>
		</form>
		<div class="formbody" style="margin-left: 120px">
			<a id="optionMenu" class="easyui-linkbutton c1" style="width:100px; height: 35px">保存</a>
			&nbsp;&nbsp;&nbsp;
			<a href="${path}/menu/index.do" class="easyui-linkbutton c1" style="width:100px; height: 35px">取消</a>
		</div>
		<!-- 图标选择 -->
		<div id="chooseIcon_dialog" class="easyui-dialog" data-options="closed:true" style="background: darkseagreen">
			<c:forEach var="iconName" items="${iconNames}">
				<div class="iconDiv" icon-name="${iconName}">
					<div class="panel-icon ${iconName}"></div>
				</div>
			</c:forEach>
		</div>
	</body>
</html>